from otree.api import Currency as c, currency_range
from ._builtin import Page, WaitPage
from .models import Constants


class welcome(Page):
    pass


class ResultsWaitPage(WaitPage):
    pass




class Survey(Page):
    form_model = 'player'
    form_fields = ['A_q1', 'A_q2', 'A_q3', 'A_q4', 'A_q5', 'A_q6', 'A_q7', 'A_q8', 'A_q9', 'A_q10']
    def vars_for_template(self):
        list=[]
        q_list = []
        for i in range(10):
            q_list.append('100%的概率获得{}元'.format(50+(i*10)))
        return dict(
            q_list=q_list,
            same_question='50%的概率获得200元，50%的概率获得0元'
        )


class Irrelevant_Issues(Page):
    form_model = 'player'
    form_fields = ['demand']
    # def is_displayed(self):
    #     return self.player.id_in_group == 1 and self.round_number <= 5



page_sequence = [welcome,Irrelevant_Issues,Survey]
